package team.archai.nexus.boot.auth.support;


import team.archai.nexus.boot.auth.entity.JwtParam;
import team.archai.nexus.boot.auth.exception.ExpiredException;
import team.archai.nexus.boot.auth.exception.InvalidException;
import team.archai.nexus.boot.auth.token.IAuth;

/**
 * @description: jwt工具类接口
 * @author: lishibin
 * @create: 2020-07-11 00:35
 **/
public interface IJwtHelper {

    /**
     * @program: IJwtHelper
     * @description: 创建token
     * @author: lishibin
     * @create: 12:58 AM
     **/

    String create(JwtParam jwtParam);

    /**
     * @program: IJwtHelper
     * @description: 撤销token
     * @author: lishibin
     * @create: 12:58 AM
     **/
    void revoke(JwtParam jwtParam);

    /**
     * @program: IJwtHelper
     * @description: 解析token
     * @author: lishibin
     * @create: 12:59 AM
     **/
    IAuth parse(String token) throws InvalidException, ExpiredException;

}
